﻿<%@ Page Title="CompareXpress - Register With CompareXpress" Language="C#" MasterPageFile="~/MasterPage.master"
    AutoEventWireup="true" ValidateRequest="false" CodeFile="editprofile.aspx.cs"
    Inherits="user_editprofile" MaintainScrollPositionOnPostback="true" %>

<%@ Register Src="~/controls/usrDate.ascx" TagName="usrDate" TagPrefix="uc2" %>
<%@ Register Src="~/controls/usrOccupationNew.ascx" TagName="usrOccupation" TagPrefix="uc3" %>
<%@ Register Src="~/controls/usrJobNature.ascx" TagName="usrJobNature" TagPrefix="uc4" %>
<%@ Register Src="~/controls/usrMobilePhone.ascx" TagName="usrPhoneNo" TagPrefix="uc7" %>
<%@ Register Src="~/controls/usrMaritalStatus.ascx" TagName="usrMaritalStatus" TagPrefix="uc8" %>
<%@ Register Src="~/controls/usrGenderNew.ascx" TagName="usrGender" TagPrefix="uc9" %>
<%@ Register Src="~/controls/usrSalutation.ascx" TagName="usrSalutation" TagPrefix="uc10" %>
<%@ Register Src="~/controls/usrNationality.ascx" TagName="usrNationality" TagPrefix="uc11" %>
<%@ Register Src="~/controls/usrDOB.ascx" TagName="usrDOB" TagPrefix="uc12" %>
<%@ Register Src="~/controls/usrNoJS.ascx" TagName="usrNoJS" TagPrefix="ucNoJS" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">

    <script src="/includes/ValidationError-NEW.js" type="text/javascript"></script>

    <script src="/includes/ValidationEffect-NEW.js" type="text/javascript"></script>

    <script src="/controls/IdNumber.js" type="text/javascript"></script>

    <script src="/controls/CE_Date.js" type="text/javascript"></script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="cpHeader" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="cpBody" runat="Server">
    <div id="container">
        <div class="body">
            <div class="topcol">
            </div>
            <div class="body">
                <div class="padding_lr15px">
                    <!-- Column Content | Start -->
                    <div class="col_content">
                        <div class="topcol">
                        </div>
                        <div class="body">
                            <div class="padding_lr30px">
                                <asp:Label ID="lblEditProgile" runat="server" CssClass="tx_title21 uppercase" Text="<%$ Resources:CarInsurance,UserEditProfileLabel%>" />
                                <div class="seperator_15px">
                                </div>
                                <div id="CarForm">
                                    <!-- Form | Start -->
                                    <asp:ValidationSummary ID="vsNewCustomer" runat="server" ValidationGroup="profile"
                                        ShowSummary="True" HeaderText="<%$ Resources:Menu,RequiredField%>" CssClass="errorSummary" />
                                    <asp:Label ID="lblNewCustomerMessage" Visible="false" runat="server"></asp:Label>
                                    <div class="seperator_15px">
                                    </div>
                                    <div>
                                        <div class="form_col_1 comp left">
                                            <asp:Label ID="lblFirstName" CssClass="tx_form" runat="server" Text="<%$ Resources:CarInsurance,Name%>" /></div>
                                        <div class="form_col_2 left">
                                            <asp:TextBox ID="txtFirstName" MaxLength="50" class="text" runat="server" Width="230px"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvFirstName" runat="server" CssClass="validationErrorControl"
                                                ValidationGroup="profile" ErrorMessage="" Text="" ControlToValidate="txtFirstName"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="revFirstName" runat="server" ValidationGroup="profile"
                                                ValidationExpression="^[\p{L}\d]*[^#$%^&*():/\.'^<>]*$" CssClass="validationErrorControl"
                                                ControlToValidate="txtFirstName" ErrorMessage=""></asp:RegularExpressionValidator>
                                        </div>
                                    </div>
                                    <div class="seperator_form">
                                    </div>
                                    <div style="display:none">
                                        <div class="form_col_1 comp left">
                                            <asp:Label ID="lblLastName" CssClass="tx_form" runat="server" Text="<%$ Resources:CarInsurance,UserEditLastName%>" /></div>
                                        <div class="form_col_2 left">
                                            <asp:TextBox ID="txtSurName" MaxLength="50" class="text" runat="server" Width="230px"></asp:TextBox>
                                        </div>
                                        <div class="seperator_form">
                                        </div>
                                    </div>
                                    <div>
                                        <div class="form_col_1 comp left">
                                            <asp:Label ID="lblEmail" CssClass="tx_form" runat="server" Text="<%$ Resources:CarInsurance,UserEditEmailAddress%>" /></div>
                                        <div class="form_col_2 left">
                                            <asp:TextBox ID="txtEmailAddress" class="text" runat="server" Width="230px" Enabled="false"></asp:TextBox>
                                            <asp:RequiredFieldValidator ID="rfvEmail" runat="server" Text="*" CssClass="validationErrorControl"
                                                ValidationGroup="profile" ErrorMessage="Require Email address" ControlToValidate="txtEmailAddress"
                                                Display="Dynamic"></asp:RequiredFieldValidator>
                                            <asp:RegularExpressionValidator ID="rfvEmailValid" Text="*" CssClass="validationErrorControl"
                                                runat="server" ValidationGroup="profile" ErrorMessage="Invalid Email address."
                                                ControlToValidate="txtEmailAddress" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"
                                                Display="Dynamic"></asp:RegularExpressionValidator>
                                        </div>
                                    </div>
                                    <div class="seperator_form">
                                    </div>
                                    <div>
                                        <div class="form_col_1 comp left">
                                            <asp:Label ID="lblMobileNum" CssClass="tx_form" runat="server" Text="<%$ Resources:CarInsurance,UserEditMobileNumber%>" /></div>
                                        <div class="form_col_2 left" style="width:230px;">
                                            <uc7:usrPhoneNo ID="txtMobileNo" ValidationGroup="profile" IsEnabled="true" PhoneNoErrorMessage="Mobile Phone No must be number value."
                                                PhoneNoValidErrorMessage="Mobile phone no is not valid." IsRequired="true" PhoneNoRequireErrorMessage="Require Mobile Phone No."
                                                runat="server" />
                                        </div>
                                    </div>
                                    <div class="seperator_form">
                                    </div>
                                    <div>
                                        <div class="form_col_1 comp left">
                                            <asp:Label ID="lblDOB" CssClass="tx_form" runat="server" Text="<%$ Resources:CarInsurance,UserEditDOB%>" /></div>
                                        <div class="form_col_2 left">
                                            <uc12:usrDOB ValidationGroup="profile" ErrorMessage="Select Your Date of Birth" ID="usrDOB"
                                                runat="server" />
                                        </div>
                                    </div>
                                    <div class="seperator_form">
                                    </div>
                                    <div>
                                        <div class="form_col_1 comp left">
                                            <asp:Label ID="lblGender" CssClass="tx_form" runat="server" Text="<%$ Resources:CarInsurance,UserEditGender%>" /></div>
                                        <div class="form_col_2 left">
                                            <uc9:usrGender ID="ddlGender" ValidationGroup="profile" IsEnabled="true" ErrorMessage="Choose Gender."
                                                runat="server" />
                                        </div>
                                    </div>
                                    <div class="seperator_form">
                                    </div>
                                    <div>
                                        <div class="form_col_1 comp left">
                                            <asp:Label ID="lblOccupation" CssClass="tx_form" runat="server" Text="<%$ Resources:CarInsurance,UserEditOccupation%>" /></div>
                                        <div class="form_col_2 left">
                                            <uc3:usrOccupation ID="ddlOccupation" runat="server" IsEnabled="true" ValidationGroup="profile"
                                                ErrorMessage="Choose Occupation." />
                                        </div>
                                    </div>
                                    <div class="seperator_form">
                                    </div>
                                    <div>
                                        <div class="form_col_1 left">
                                        &nbsp;
                                        </div>
                                        <div class="form_col_2 left">
                                              <asp:Label ID="lblSetInsMessage" CssClass="tx_form" Text="" Font-Size="12px" ForeColor="Green" Font-Bold="true"
                                                    Font-Names="Arial" runat="server"></asp:Label>
                                        </div>
                                    </div>                                    
                                    <div class="seperator_15px">
                                    </div>
                                    <div>
                                        <div class="form_col_1 left">
                                        &nbsp;
                                        </div>
                                        <div class="form_col_2 left">
                                            <asp:Button ID="btnSubmit" Text="<%$ Resources:HomePage,Submit%>" 
                                                CssClass="button_submit" OnClientClick="LoadValidationErrorCss();if (Page_ClientValidate('profile')){this.removeAttribute('onmouseout');this.removeAttribute('onmouseup');}"
                                                runat="server" ValidationGroup="profile" AlternateText="Submit" ToolTip="Submit"
                                                CausesValidation="true" OnClick="btnSubmit_Click" />
                                        </div>
                                    </div>
                                    <!-- Form | End   -->
                                </div>
                            </div>
                        </div>
                        <div class="bottom">
                        </div>
                    </div>
                    <!-- Column Content | End   -->
                    <!--------------CONTENT HERE -------------->
                    <!-- Column Right | Start -->
                    <div>
                        <div class="col_right-white">
                            <div class="topcol">
                            </div>
                            <div class="body text_center">
                                <div class="tip">
                                    <asp:HyperLink runat="server" ID="hplGetQuote" ToolTip="<%$ Resources:Menu,GetACarInsuranceQuote%>"
                                        NavigateUrl="~/car-insurance/car-details.aspx">                                
                                    <asp:Image ID="Image1" runat="server" ImageUrl="<%$Resources:ImageResource,OfferBannerUrl1%>"
                                        Width="234" Height="188" AlternateText="Payment" />
                                    </asp:HyperLink> 
                                </div>
                            </div>
                            <div class="bottom">
                            </div>
                        </div>
                    </div>
                    <!-- Column Right | End   -->
                </div>
            </div>
            <div class="bottom">
            </div>
        </div>
        <div id="divHiddenMonths" style="display: none;">
            <input runat="server" id="lblJan" type="hidden" value="<%$ Resources:MonthResource, January%>" />
            <input runat="server" id="lblFeb" type="hidden" value="<%$ Resources:MonthResource, February%>" />
            <input runat="server" id="lblMar" type="hidden" value="<%$ Resources:MonthResource, March%>" />
            <input runat="server" id="lblApr" type="hidden" value="<%$ Resources:MonthResource, April%>" />
            <input runat="server" id="lblMay" type="hidden" value="<%$ Resources:MonthResource, May%>" />
            <input runat="server" id="lblJun" type="hidden" value="<%$ Resources:MonthResource, June%>" />
            <input runat="server" id="lblJul" type="hidden" value="<%$ Resources:MonthResource, July%>" />
            <input runat="server" id="lblAug" type="hidden" value="<%$ Resources:MonthResource, August%>" />
            <input runat="server" id="lblSep" type="hidden" value="<%$ Resources:MonthResource, September%>" />
            <input runat="server" id="lblOct" type="hidden" value="<%$ Resources:MonthResource, October%>" />
            <input runat="server" id="lblNov" type="hidden" value="<%$ Resources:MonthResource, November%>" />
            <input runat="server" id="lblDec" type="hidden" value="<%$ Resources:MonthResource, December%>" />
            <input runat="server" id="lblCultureInfo" type="hidden" />
        </div>
    </div>

    <script type="text/javascript">
        //<![CDATA[

        function ShowRequireMessage(ctrlMessage, strMessage) {
            alert(strMessage);
            if (document.getElementById(ctrlMessage).textContent) {
                document.getElementById(ctrlMessage).textContent = strMessage;
            }
            else {
                document.getElementById(ctrlMessage).innerText = strMessage;
            }
        }

        function CheckSalutation(sender, args) {
            var ctrlSelect = document.getElementById('<=ddlSalutation.ClientID>');

            if (ctrlSelect.value == -1) {
                args.IsValid = false;
            }
        }

        function checkEmail() {
            var email = document.getElementById('emailaddress');
            var filter = "/^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+.)+([a-zA-Z0-9]{2,4})+$/";
            if (!filter.test(email.value)) {
                alert('Please provide a valid email address');
                email.focus
                return false;
            }
        }

        function CheckMobileNoClientValidate(source, arguments) {
            var cval = parseInt(arguments.Value)
            if (isNaN(cval)) {
                arguments.IsValid = false;
            } else {
                var cstrVal = "" + cval + "";
                if (cstrVal.length < 8) {
                    arguments.IsValid = false;
                }
                else {
                    arguments.IsValid = true;
                }
            }
        }

        function CheckOfficeNoClientValidate(source, arguments) {
            var cval = parseInt(arguments.Value)
            if (isNaN(cval)) {
                arguments.IsValid = false;
            } else {
                var cstrVal = "" + cval + "";
                if (cstrVal.length < 8) {
                    arguments.IsValid = false;
                }
                else {
                    arguments.IsValid = true;
                }
            }
        }
        function hasWhiteSpace(s) {

            reWhiteSpace = new RegExp(/^\s+$/);

            // Check for white space
            if (reWhiteSpace.test(s)) {
                alert("Please Check Your Fields For Spaces");
                return true;
            }
            return false;
        }

        function trim(stringToTrim) {
            return stringToTrim.replace(/^\s+|\s+$/g, "");
        }


        function ShowKeyCode(e) {
            var code;
            if (!e) var e = window.event;
            if (e.keyCode) code = e.keyCode;
            else if (e.which) code = e.which;
            if (code == 18) {
                code = 0;
                alert('Not allow!');
            }

            return false;
            //var character = String.fromCharCode(code);
            //alert('Character was ' + character);
        }
        //]]>
                
    </script>

</asp:Content>
